-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TaskConfig: Add option for file_limit
to set RLIMIT_NOFILE
#180
base: master
Are you sure you want to change the base?
Conversation
containerd/containerd.go
Outdated
@@ -342,6 +380,7 @@ func (d *Driver) createContainer(containerConfig *ContainerConfig, config *TaskC | |||
containerd.WithRuntime(d.config.ContainerdRuntime, nil), | |||
containerd.WithNewSnapshot(containerConfig.ContainerSnapshotName, containerConfig.Image), | |||
containerd.WithNewSpec(opts...), | |||
withFileLimit(uint64(config.FileLimit)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of unmarshalling just-built spec back, I'd suggest setting rlimit by appending your function to opts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out, I had to read a load of source code to find the right knobs to twist for this and that was something I missed. New revision just pushed up and verified in my test system!
eea3c06
to
eb2daff
Compare
Depending on the workload, the default resource limit (ulimit) for the max number of file descriptors per process may need to be raised, such as for database servers. Add a `file_limit` option to the task config which will allow the limit to be set per task. Signed-off-by: Ryan Sundberg <[email protected]>
@slonopotamus Please re-approve when you get a chance, I had to rebase the branch. Thanks! |
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
I have read the CLA Document and I hereby sign the CLA |
Depending on the workload, the default resource limit (ulimit) for the max number of file descriptors per process may need to be raised, such as for database servers. Add a
file_limit
option to the task config which will allow the limit to be set per task.